<template>
  <base-layout
    dialog-title="新增卡种"
    :dialog-visible="dialogVisible"
    dialog-width="600px"
    :page-show="pageShow"
    @dialog-close="dialogClose"
  >
    <template #toolPanel />
    <template #searchPanel>
      <search-panel :show-add-button="false" labelWidth="73"  :show-search-button="false" :left="false">
        <el-row>
          <el-form-item label="用户编号:">
            <el-input v-model="filters.serialNumber" style="width: 200px" placeholder="用户姓名" />
          </el-form-item>
          <el-form-item label="渠道名称:">
            <el-input v-model="filters.purchasingListNumber" maxlength="100" clearable />
          </el-form-item>
          <el-form-item label="邀请者名称:">
            <el-input v-model="filters.purchasingListNumber" maxlength="100" clearable />
          </el-form-item>
          <el-form-item label="是否生效:">
            <el-input v-model="filters.purchasingListNumber" maxlength="100" clearable />
          </el-form-item>
          <el-form-item label="备注:">
            <el-input v-model="filters.purchasingListNumber" maxlength="100" clearable />
          </el-form-item>
          <el-form-item label="开始时间:">
            <el-input v-model="filters.purchasingListNumber" maxlength="100" clearable />
          </el-form-item>
          <el-form-item label="结束时间:">
            <el-input v-model="filters.purchasingListNumber" maxlength="100" clearable />
          </el-form-item>
          <el-form-item>
            <el-button type="primary" size="small" round @click="setTableData()">查询</el-button>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" size="small" round @click="dialogVisible = true">导出</el-button>
          </el-form-item>
        </el-row>
      </search-panel>
    </template>
    <template #contentPanel>
      <data-table
        :value="tableData"
        :total-count="totalCount"
        :has-action="true"
        :current="start"
        :table-column-attributes="tableColumnAttributes"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
      >
        <template #action="{row}">
          <el-button type="text" @click="dialogVisible = true">编辑</el-button>
          <el-button type="text" style="color:red;" @click="deletedRow(scope.row)">删除</el-button>
        </template>
      </data-table>
    </template>

    <template #dialog>
    </template>

  </base-layout>
</template>

<script>
  import baseMixin from '@/mixins/base'

  export default {
    name: 'invitationRecord',
    mixins: [
      baseMixin({
        idName: 'id',
        refresh: '',
        format(res) {
          return res.map(data => {
            return data
          })
        }
      })
    ],
    data() {
      return {
        buttons: [],
        pageShow: true,
        dialogData:{},
        tableColumnAttributes: [
          { name: '用户编号', value: 'zzz' },
          { name: '渠道名称', value: 'zzz' },
          { name: '邀请者名称', value: 'zzz' },
          { name: '是否生效', value: 'zzz' },
          { name: '销卡总面值', value: 'zzz' },
          { name: '佣金', value: 'zzz' },
          { name: '佣金比例', value: 'zzz' },
          { name: '备注', value: 'zzz' },
          { name: '创建时间', value: 'zzz'},
        ],
        filters: {
          items: [
            { zzz: 222 }
          ]
        }
      }
    },
    methods: {

    }
  }
</script>
